package demo2;

import sun.awt.image.ImageWatched;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;

public class Test1 {
    public static void main(String[] args) {
        SeqList seqList = new SeqList();
        seqList.add(1);
        seqList.add(2);
        seqList.add(3);
        seqList.add(4);
        seqList.add(5);
        seqList.add(6);
        try {
            seqList.get(10);
        }catch (PosOutBoundsException e){
            e.printStackTrace();
            System.out.println("pos参数不合法，超出了顺序表的范围");
        }
        seqList.display();


    }
    public static void main1(String[] args) {
        List<Integer> stack = new Stack<>();//栈
        List<Integer> arrayList = new ArrayList<>();//顺序表
        List<Integer> linkedList = new LinkedList<>();//链表
    }
}
